import React from 'react'
import style from './jsErrorLog.scss'

export const jsErrorLogRender = errorLog => {
    const { url, lineNumber, columnNumber, text } = errorLog.error

    return <div key={errorLog.id} className={style.error_log}>
        <div>
            url: {url}
        </div>
        {lineNumber >= 0 && <div>
            lineNumber: {lineNumber}
        </div>}
        {columnNumber >= 0 && <div>
            columnNumber: {columnNumber}
        </div>}
        <div>
            text: {text}
        </div>
    </div>
}